import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '会员ID',
    align:"center",
    dataIndex: 'memberId'
   },
   {
    title: '会员名称',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '联系方式',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '头像',
    align:"center",
    dataIndex: 'avatar',
    customRender:render.renderImage,
   },
   {
    title: '性别：0-未知，1-男，2-女',
    align:"center",
    dataIndex: 'sex_dictText'
   },
   {
    title: '最高学历',
    align:"center",
    dataIndex: 'education_dictText'
   },
   {
    title: '开始工作时间',
    align:"center",
    dataIndex: 'timeToWork',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
   {
    title: '工作年限',
    align:"center",
    dataIndex: 'workYear'
   },
   {
    title: '出生日期',
    align:"center",
    dataIndex: 'birthday',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
   {
    title: '薪资要求',
    align:"center",
    dataIndex: 'salaryLow'
   },
   {
    title: '薪资要求',
    align:"center",
    dataIndex: 'salaryUp'
   },
   {
    title: '期望薪资，如10-20K',
    align:"center",
    dataIndex: 'expectSalary_dictText'
   },
   {
    title: '所属公司',
    align:"center",
    dataIndex: 'company'
   },
   {
    title: '公司职位',
    align:"center",
    dataIndex: 'postId'
   },
   {
    title: '个人特长',
    align:"center",
    dataIndex: 'personalSkill'
   },
   {
    title: '技能标签',
    align:"center",
    dataIndex: 'skills'
   },
   {
    title: '有限地址',
    align:"center",
    dataIndex: 'email'
   },
   {
    title: '求职状态',
    align:"center",
    dataIndex: 'jobStatus_dictText'
   },
   {
    title: '浏览数量',
    align:"center",
    dataIndex: 'browseNumber'
   },
   {
    title: '是否启用',
    align:"center",
    dataIndex: 'status'
   },
   {
    title: '排序',
    align:"center",
    dataIndex: 'sort'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: 'tenantId',
    align:"center",
    dataIndex: 'tenantId'
   },
   {
    title: '删除状态(0-正常,1-已删除)',
    align:"center",
    dataIndex: 'delFlag'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "会员名称",
      field: "name",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "联系方式",
      field: "phone",
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '会员ID',
    field: 'memberId',
    component: 'Input',
  },
  {
    label: '会员名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '联系方式',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '头像',
    field: 'avatar',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '性别：0-未知，1-男，2-女',
    field: 'sex',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"sex"
     },
  },
  {
    label: '最高学历',
    field: 'education',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"education"
     },
  },
  {
    label: '开始工作时间',
    field: 'timeToWork',
    component: 'DatePicker',
  },
  {
    label: '工作年限',
    field: 'workYear',
    component: 'Input',
  },
  {
    label: '出生日期',
    field: 'birthday',
    component: 'DatePicker',
  },
  {
    label: '薪资要求',
    field: 'salaryLow',
    component: 'Input',
  },
  {
    label: '薪资要求',
    field: 'salaryUp',
    component: 'Input',
  },
  {
    label: '期望薪资，如10-20K',
    field: 'expectSalary',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"expect_salary"
     },
  },
  {
    label: '所属公司',
    field: 'company',
    component: 'Input',
  },
  {
    label: '公司职位',
    field: 'postId',
    component: 'InputNumber',
  },
  {
    label: '个人特长',
    field: 'personalSkill',
    component: 'Input',
  },
  {
    label: '技能标签',
    field: 'skills',
    component: 'Input',
  },
  {
    label: '有限地址',
    field: 'email',
    component: 'Input',
  },
  {
    label: '求职状态',
    field: 'jobStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"job_status"
     },
  },
  {
    label: '浏览数量',
    field: 'browseNumber',
    component: 'InputNumber',
  },
  {
    label: '是否启用',
    field: 'status',
    component: 'Input',
  },
  {
    label: '排序',
    field: 'sort',
    component: 'InputNumber',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: 'tenantId',
    field: 'tenantId',
    component: 'InputNumber',
  },
  {
    label: '删除状态(0-正常,1-已删除)',
    field: 'delFlag',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
//子表单数据
//子表表格配置
export const wmsProExpColumns: JVxeColumn[] = [
    {
      title: '简历ID',
      key: 'resumeId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'memberId',
      key: 'memberId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '项目名称',
      key: 'name',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '担任角色',
      key: 'role',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '开始时间',
      key: 'startDate',
      type: JVxeTypes.date,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '结束时间',
      key: 'endDate',
      type: JVxeTypes.date,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '项目描述',
      key: 'descr',
      type: JVxeTypes.textarea,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '项目业绩',
      key: 'performance',
      type: JVxeTypes.textarea,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '项目链接',
      key: 'url',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '是否启用',
      key: 'status',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '排序',
      key: 'sort',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '备注',
      key: 'remark',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'tenantId',
      key: 'tenantId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '删除状态(0-正常,1-已删除)',
      key: 'delFlag',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]
export const wmsWorkExpColumns: JVxeColumn[] = [
    {
      title: '简历ID',
      key: 'resumeId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '会员ID',
      key: 'memberId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '公司名称',
      key: 'companyName',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '所在行业',
      key: 'industryId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '行业名称',
      key: 'industryName',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '开始日期',
      key: 'startDate',
      type: JVxeTypes.date,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '离职日期',
      key: 'endDate',
      type: JVxeTypes.date,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '职位名称',
      key: 'postId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '职位名称',
      key: 'postName',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '工作内容',
      key: 'jobContent',
      type: JVxeTypes.textarea,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '所属部门',
      key: 'department',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '技能标签',
      key: 'skill',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '是否启用',
      key: 'status',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '排序',
      key: 'sort',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '备注',
      key: 'remark',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'tenantId',
      key: 'tenantId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '删除状态(0-正常,1-已删除)',
      key: 'delFlag',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]
export const wmsEduExpColumns: JVxeColumn[] = [
    {
      title: '简历ID',
      key: 'resumeId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '会员ID',
      key: 'memberId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '学校',
      key: 'school',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '学历',
      key: 'education',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '是否全日制',
      key: 'ifFullTime',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '专业',
      key: 'major',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '开始时间',
      key: 'startTime',
      type: JVxeTypes.date,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '结束时间',
      key: 'endTime',
      type: JVxeTypes.date,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '在校经历',
      key: 'schoolExp',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '是否启用',
      key: 'status',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '排序',
      key: 'sort',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '备注',
      key: 'remark',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'tenantId',
      key: 'tenantId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '删除状态(0-正常,1-已删除)',
      key: 'delFlag',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]
export const wmsJobExpectColumns: JVxeColumn[] = [
    {
      title: '简历ID',
      key: 'resumeId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '会员ID',
      key: 'memberId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '求职类型：0-全职，1-兼职',
      key: 'jobType',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '工作城市',
      key: 'workCity',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '期望职位',
      key: 'postId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '职位名称',
      key: 'postName',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '期望行业',
      key: 'industryId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '行业名称',
      key: 'industryName',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '薪资要求',
      key: 'salaryLow',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '薪资要求',
      key: 'salaryUp',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '期望薪资，如10-20K',
      key: 'expectSalary',
      type: JVxeTypes.select,
      options:[],
      dictCode:"expect_salary",
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '是否启用',
      key: 'status',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '排序',
      key: 'sort',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '备注',
      key: 'remark',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'tenantId',
      key: 'tenantId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '删除状态(0-正常,1-已删除)',
      key: 'delFlag',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]
export const wmsResumeFileColumns: JVxeColumn[] = [
    {
      title: '简历ID',
      key: 'resumeId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '会员ID',
      key: 'memberId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '文件名称',
      key: 'fileName',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '文件类型',
      key: 'fileExt',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '文件大小,带单位',
      key: 'fileSize',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '文件地址',
      key: 'fileUrl',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '附件图标',
      key: 'fileIcon',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '是否启用',
      key: 'status',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '排序',
      key: 'sort',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '备注',
      key: 'remark',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'tenantId',
      key: 'tenantId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '删除状态(0-正常,1-已删除)',
      key: 'delFlag',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]
